﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Barbar.UrlGuard.Controls {
  public class LocalizableLabel : Label, ILocalizable {
    private string m_Key;

    public string Key {
      get { return m_Key; }
      set { m_Key = value; }
    }

    #region ILocalizable Members

    public void Localize(ILocalizator localizator) {
      if (localizator == null)
        throw new ArgumentNullException("localizator");

      Text = localizator.Translate(Key);
    }

    #endregion
  }
}
